from datetime import date

today_date = date.today()
formatted_today = today_date.strftime("%Y-%m-%d")
print(formatted_today)  # 格式化后的今天日期，如："2023-04-05"